package com.example.gyrodemo;

/**
 * @author qjy
 */
public class GyroDataProcessing {

    private double xl;
    private double yl;
    private double alpha = 0.0;

    public double getXl() {
        return xl;
    }

    public double getYl() {
        return yl;
    }

    public void firOrdexpSmoothing(double x, double y){
        xl = (1-alpha)*x + alpha*xl;
        yl = (1-alpha)*y + alpha*yl;
    }

    public double getAlpha() {
        return this.alpha;
    }

    public void setAlpha(double alpha) {
        this.alpha = alpha;
    }
}
